﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HlcLogViewer
{
    public class LogViewUtil
    {
        public static Color ConvertBackColor(LogLevel logLevel, Color defaultColor)
        {
            switch (logLevel)
            {
                case LogLevel.FATAL:
                    return Color.Red;
                default:
                    return defaultColor;
            }
        }

        public static Color ConvertForColor(LogLevel logLevel, Color defaultColor)
        {

            switch (logLevel)
            {
                case LogLevel.DEBUG:
                    return Color.DarkGreen;
                case LogLevel.INFO:
                    return Color.White;
                case LogLevel.WARN:
                    return Color.Orange;
                case LogLevel.ERROR:
                    return Color.Red;
                case LogLevel.FATAL:
                    return Color.White;
                default:
                    return defaultColor;
            }
        }
    }
}
